﻿using System.Data;

namespace TurtleEngine
{
	 /// <summary>
	 ///
	 /// </summary>
	 public class IndexColumnsHelper
	 {
		  /// <summary>
		  /// The index columns
		  /// </summary>
		  private static DataTable indexColumns = new DataTable("IndexColumns");

		  /// <summary>
		  /// Gets the index columns.
		  /// </summary>
		  /// <value>
		  /// The index columns.
		  /// </value>
		  public static DataTable IndexColumns
		  {
				get { return indexColumns; }
		  }

		  /// <summary>
		  /// Gets the index columns.
		  /// </summary>
		  public static void GetIndexColumns()
		  {
				indexColumns.Clear();
				indexColumns = Utility.DBConnection.GetSchema("IndexColumns");

				//Utility.PrintDatatable(indexColumns);
		  }

		  /// <summary>
		  /// Writes the index columns.
		  /// </summary>
		  public static void WriteIndexColumns()
		  {
				Utility.WriteXML(indexColumns, indexColumns.TableName + ".xml");

				//Utility.PrintDatatable(indexColumns);
		  }
	 }
}